; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v3.3.3 on Wed Sep 29 2021 19:26:52 GMT+0100 (British Summer Time)

;; reduce accelerations to avoid false triggering 
M201 X500 Y500				; reduce acceleration to avoid false triggering


;== Home Axis X

G91               ; relative positioning
M913 X40 Y40      ; drop motor current to 30%

G1 H1 X-240 F4400 ; move quickly to X axis endstop at 25mm/s for stalldetection
G1 X10 F6000       ; go back a few mm

M913 X100 Y100    ; raise motor current to 100%

G90               ; absolute positioning

;== Home Axis Y

G91               ; relative positioning

M913 X40 Y40      ; drop motor current to 30%

G1 H1 Y285 F4400 ; move quickly to Y axis endstop at minimum of 30mm/s for stall detection 
G1 Y-10 F6000       ; go back a few mm

M913 X100 Y100    ;raise motor current to 100%

G90               ; absolute positioning

;== Home Axis X

G91               ; relative positioning
M913 X40 Y40      ; drop motor current to 30%

G1 H1 X-20 F4400 ; move quickly to X axis endstop at 25mm/s for stalldetection
G1 X10 F6000       ; go back a few mm

M913 X100 Y100    ; raise motor current to 100%

G90               ; absolute positioning


;== Home Axis Z

G91              ; relative positioning
G90              ; absolute positioning
G1 X110 Y170 F6000 ; go to first probe point in middle of bed
G30
G1 Z35

M201 X20000.00 Y20000.00 Z300.00 E4000.00    
; Uncomment the following lines to lift Z after probing
;G91                    ; relative positioning
;G1 Z10 F100            ; lift Z relative to current position
;G90                    ; absolute positioning


